<?php

namespace app\api\validate;

use think\Validate;

class MeizhuangComment extends Validate{
    /**
     * 验证规则
     */
    protected $rule = [
        'order_id' => [
            'require',
        ],
        'miaoshuStar' => [
            'require',
        ],
        'wuliuStar' => [
            'require',
        ],
        'fuwuStar' => [
            'require',
        ],
        'content' => [
            'require',
        ],
        'goods_id' => [
            'require',
        ],
        'user_id' => [
            'require',
        ],
        'type' => [
            'require',
        ],
        'imageids' => [
            'require',
        ],
        'tag' => [
            'require',
        ],

    ];

    protected $message  =   [
        'order_id.require'   => '订单id不能为空',
        'miaoshuStar.require'   => '描述星级不能为空',
        'wuliuStar.require'   => '物流星级不能为空',
        'fuwuStar.require'   => '服务星级不能为空',
        'content.require'   => '评价内容不能为空',
        'goods_id.require'   => '商品id不能为空',
        'user_id.require'   => '用户id不能为空',
        'type.require'   => '评论类型不能为空',
        'imageids.require'   => '图片id参数不能为空',
        'tag.require'   => '标签不能为空',
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add' => ['order_id','miaoshuStar','wuliuStar','fuwuStar','content','goods_id','user_id','type','imageids','tag'],
    ];
}
